<!--编辑咨询-->
<template>
    <div>
        <el-row>
            <el-col :span="18">
                <el-form :inline="true" :model="formInline" class="demo-form-inline">
                    <!--资质类别-->
                    <el-form-item label="资质类别">
                        <!--<el-select v-model="form.aptitudeId" placeholder="资质类别" size="">-->
                            <!--<el-option label="区域一" value="shanghai" v-for="item in aptitudeList"></el-option>-->
                        <!--</el-select>-->
                        <el-select v-model="form.aptitudeId">
                            <el-option label="专项" value="0" ></el-option>
                            <el-option label="综合" value="1" ></el-option>
                        </el-select>
                    </el-form-item>
                    <!--资质颁发单位-->
                    <el-form-item label="资质颁发单位">
                        <!--<el-select v-model="form.aptitudeawardId" placeholder="资质颁发单位">-->
                            <!--<el-option label="区域一" value="shanghai" v-for="item in  aptitudeawardList"></el-option>-->
                        <!--</el-select>-->
                        <el-select v-model="form.aptitudeawardId">
                            <el-option label="住建部" value="0" ></el-option>
                            <el-option label="环保部" value="1" ></el-option>
                            <el-option label="发改委" value="2" ></el-option>
                            <el-option label="行业协会" value="3" ></el-option>
                            <el-option label="其他" value="4" ></el-option>
                        </el-select>
                    </el-form-item>
                </el-form>
                <!--资质等级-->
                <el-form :inline="true" :model="formInline" class="demo-form-inline">
                    <el-form-item label="资质等级">
                        <!--<el-select v-model="form.aptitudelevelId" placeholder="资质等级" size="">-->
                            <!--<el-option label="区域一" value="shanghai" v-for="item in  aptitudelevelList"></el-option>-->
                        <!--</el-select>-->
                        <el-select v-model="form.aptitudelevelId">
                            <el-option label="甲级" value="0" ></el-option>
                            <el-option label="乙级" value="1" ></el-option>
                            <el-option label="丙级" value="2" ></el-option>
                            <el-option label="其他" value="3" ></el-option>
                        </el-select>
                    </el-form-item>
                    <!--其他-->
                    <el-form-item label="其他">
                        <el-input v-model="formInline.user" placeholder="审批人"></el-input>
                    </el-form-item>
                </el-form>
                <!--收费标准-->
                <el-form :inline="true" :model="formInline" class="demo-form-inline">
                    <el-form-item label="收费标准">
                        <el-input v-model="formInline.user" placeholder="收费标准"></el-input>
                    </el-form-item>
                    <!--专业领域-->
                    <el-form-item label="专业领域">
                        <el-input v-model="formInline.user" placeholder="专业领域"></el-input>
                    </el-form-item>
                </el-form>
                <!--添加关键人物-->
                <h3>关键人物</h3>
                <el-form :inline="true" :model="formInline" class="demo-form-inline" v-for="(item,index) in keyManmessage" style="padding-left: 80px">
                    <el-form-item >
                        <el-select v-model="entrepot[index].name" placeholder="请选择">
                            <el-option
                                    v-for="data in item.man"
                                    :label="data.label"
                                    :value="data.value">
                            </el-option>
                        </el-select>
                    </el-form-item>
                    <el-form-item label="职务">
                        <el-select v-model="entrepot[index].status" placeholder="请选择">
                            <el-option
                                    v-for="data in item.man"
                                    :key="data.value"
                                    :label="data.label"
                                    :value="data.value">
                            </el-option>
                        </el-select>
                    </el-form-item>
                    <el-button type="text" @click="delMan(index)">移除</el-button>
                </el-form>
                <el-button type="info" @click="addMan" style="margin-left: 80px">添加人物</el-button>
            </el-col>
            <el-col :span="1">
                <hr style="height:200px;width: 1px">
            </el-col>
            <el-col :span="5"><div >
                <h2>评价星级</h2>
                <el-form :inline="true" :model="formInline" class="demo-form-inline">
                    <el-form-item>
                        <el-select v-model="formInline.star" placeholder="评价星级">
                            <el-option label="一星" value="shanghai"></el-option>
                            <el-option label="二星" value="beijing"></el-option>
                            <el-option label="三星" value="tar"></el-option>
                            <el-option label="四星" value="shang"></el-option>
                            <el-option label="五星" value="shanhai"></el-option>
                        </el-select>
                    </el-form-item>
                </el-form>
            </div></el-col>
        </el-row>
    </div>
</template>
<script>
    import _http from '@/components/common/http.vue'
    import _param from '@/components/common/param.vue'
    export default {
        data() {
            return {
                apiPort:{
//                    资质类别
                    aptitudeApi:'',
//                    资质颁发单位
                    aptitudeawardApi:'',
//                    资质等级
                    aptitudelevelApi:'',
//
                },
                form:{
//                    资质类别列表
                    aptitudeList:'',
                    aptitudeId:'',
//                    资质颁发单位列表
                    aptitudeawardList:'',
                    aptitudeawardId:'',
//                    资质等级列表
                    aptitudelevelList:'',
                    aptitudelevelId:''
                },
                //                关键人物信息存储
                entrepot:[{name:'',status:''}],
                keyManmessage:[{
                    man:[
                        {
                            value: '选项4',
                            label: '龙须面'
                        }, {
                            value: '选项5',
                            label: '北京烤鸭'
                        }
                    ],
                    duty:[
                        {
                            value: '选项4',
                            label: '龙须面'
                        },
                        {
                            value: '选项5',
                            label: '北京烤鸭'
                        }
                    ]}
                ],
                information:{
                    classes:'综合',
                    issued:'住建部',
                    grade:'甲级',
                    charge:'100000元每案',
                    professField:'土地规划，环保设计',
                    keyMan1:'俞兆洪-总裁/CEO-18058715658',
                    keyMan2:'吴高翔-销售-18058715658'
                },
                formInline: {
                    user: '',
                    region: '',
                    star:''

                }
            }
        },
        mounted(){
            this.getType()
        },
        methods:{
            getType(){
                var that = this
//            获取资质类别
                _http.axiosGet(that,that.apiPort.aptitudeApi,(res)=>{
                    that.form.aptitudeList=res.L0

            })
//            获取资质颁发单位
                _http.axiosGet(that,that.apiPort.aptitudeawardApi,(res)=>{
                    that.form.aptitudeawardList=res.L0

            })
//            资质等级
                _http.axiosGet(that,that.apiPort.aptitudelevelApi,(res)=> {
                    that.form.aptitudelevelList = res.L0
            })
            },
            addMan(){
                this.entrepot.push(
                        {name:'',status:''}
                )
                this.keyManmessage.push(
                        {
                            man:[
                                {
                                    value: '选项4',
                                    label: '龙须面'
                                }, {
                                    value: '选项5',
                                    label: '北京烤鸭'
                                }
                            ],
                            duty:[
                                {
                                    value: '选项4',
                                    label: '龙须面'
                                },
                                {
                                    value: '选项5',
                                    label: '北京烤鸭'
                                }
                            ]}
                )
            },
            delMan(index){
                this.entrepot.splice(index,1)
                this.keyManmessage.splice(index,1)
            },
            openDialog(dialog){
                this.dialog[dialog].open = true
            }
        }
    }
</script>